<?php
/**
 * Created by 项目.
 * User: xuguopeng
 * Date: 7/10/21
 * Time: 10:51 PM
 */

namespace app\api\model;


use think\model\concern\SoftDelete;

class GfActivity extends BaseModel
{
    use SoftDelete;


    public function imgs()
    {
        return $this->hasMany('GfActivityImg','activity_id','id')->order('id asc');
    }

    public function getStartTimeAttr($value)
    {
        if($value) {
            return date('Y-m-d H:i:s',$value);
        }
    }

    public function getEndTimeAttr($value)
    {
        if($value) {
            return date('Y-m-d H:i:s',$value);
        }
    }

}